<!DOCTYPE html>
<html lang="{{ str_replace('_','-', app()->getLocale()) }}">
    <head>
        <meta charset="UTF-8">
        <title>Wroteit</title>
    </head>
    <body style="background-image: linear-gradient(to bottom right, #f7f3ee, #f7f1e6);">
        <h1 style="text-align: center;"><img src="{{ asset('/img/logo.png') }}" style="width:32px;height:32px;">  Wroteit</h1>
        @if (Auth::check())
            <h3 style="position:absolute;left:1%;top:5%">Welcome back, {{Auth::user()->name}} <a href=" {{route('logout')}}" title="Logout">Logout</a></h3>
			<h4 style="position:absolute;right:1%;top:5%">
				<a href=" {{route('messages_main')}}" title="Messages">Check messages</a>
				<a href="{{ route('list_subscriptions') }}" title="Subscriptions">My subscriptions</a>
				<a href="{{ route('list_all_topics') }}" title="Topics">List topics</a>
			</h4>
        @else
            <p><h3 style="text-align:center;">Welcome wroter. Do you have an account? <a href=" {{route('login')}}" title="Login">Login</a> Or do you need a new one? <a href=" {{route('register')}}" title="Register">Register</a></h3></p>
        @endif

        @if (Route::currentRouteName() != 'main')
            <h4 style="position:absolute;left:3%;top:1%"><a href=" {{route('main')}}" title="Go main">Go to main page</a></h4>
        @endif
        <hr>

        @yield('content')
    </body>
</html>
